package com.xmwzw.catpu.widget;

import android.app.Dialog;
import android.content.Context;
import android.support.annotation.NonNull;
import android.view.Gravity;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;

/**
 * @author : wangzw
 * @date : 20-4-1下午3:35
 * @desc :
 */
public class SimpleDialog extends Dialog {
    //    style引用style样式
    public SimpleDialog(Context context,  View layout, int style) {

        super(context, style);

        setContentView(layout);

        Window window = getWindow();

        WindowManager.LayoutParams params = window.getAttributes();

        params.gravity = Gravity.CENTER;

        window.setAttributes(params);
    }

}
